//
//  ViewManager.swift
//  readmate
//
//  Created by fallen.ink on 01/07/2017.
//  Copyright © 2017 fallen.ink. All rights reserved.
//

import UIKit

class ViewManager {
    // MARK: singleton
    static let sharedInstance = ViewManager()
    private init() {}
    
    // MARK: main views
    
    private func homeScene() -> _Scene {
        return UserBookModuleConfigurator.sharedInstance.configureUserBookListView()
    }
    
    private func profileScene() -> _Scene {
        return _Scene()
    }
    
    // MARK:
    
    func rootScene() -> UIViewController {
        
        let homeScene = self.homeScene();
        
        let rootTabBarController = _TabBarController();
        
        homeScene.tabBarItem = _TabBarItem.init(RootTabBarItemContentView(), title: "Home", image: UIImage(named: "home"), selectedImage: UIImage(named: "home_1"))
        
        // add navigation
        let homeNavigator = _Navigator(homeScene)
        rootTabBarController.viewControllers = [homeNavigator];
        
//        let navigator = _Navigator.init(rootViewController: rootTabBarController)
        
        return rootTabBarController
    }
}
